package com.app.controller;


import com.app.model.Fwlq;
import com.app.service.IFwlqService;
import com.app.util.Result;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.api.R;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 房屋楼群，不考虑 前端控制器
 * </p>
 *
 * @author yoominic
 * @since 2025-02-27
 */

@RestController
@RequestMapping("/fwlq")
public class FwlqController {

    @Autowired
    private IFwlqService fwlqService;


    @ApiOperation(value = "获取房屋类区下拉列表", notes = "获取房屋类区下拉列表")
    @GetMapping("/fwlqList")
    public Result getFwlq() {
        QueryWrapper<Fwlq> queryWrapper = new QueryWrapper<>();
        queryWrapper.orderByAsc("lq_value");
        List<Fwlq> fwlqs = fwlqService.list(queryWrapper);
        return Result.success(fwlqs);
    }

}

